<?php
/**
 * Layui测试
 */
namespace app\admins\controller\test;
use \app\admins\controller\Base;
class Layui extends Base {
    
    public function data($get = false){
        for($i = 0 ; $i< 6 ; $i++){
            $list[] = [
                'id'        => $i,
                'username'  => '名字'.$i,
                'sex'       => '男',
                'city'      => '广东省广州市天河区东圃大铺是没有',
                'sign'      => md5(time()),
                'experience'=> 10*$i,
                'score'     => 1,
                'classify'  => '职业是程序员',
                'wealth'    => 999999
            ];
        }
        if( $get ) return ['list'=>$list];
        exit( json_encode(["code"=> 0,'count'=> 100,'data'=> $list]));
        
    }
    
    public function index(){
        $this->assign(get_defined_vars());
        return $this->fetch();
    }
    
    
    public function table(){
        $data = $this->data(true);
        $this->assign(get_defined_vars());
        return $this->fetch();
    }
    
    public function table1(){
        $data = $this->data(true);
        $this->assign(get_defined_vars());
        return $this->fetch();
    }
    
    public function demo(){
        return $this->fetch();
    }
    
    public function div(){
        return $this->fetch();
    }
}